﻿using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;

namespace CommonManagement.EntityFrameworkCore
{
    /// <summary>
    /// 公共管理数据上下文
    /// </summary>
    [ConnectionStringName("CommonManagement")]
    public class CommonManagementDbContext : AbpDbContext<CommonManagementDbContext>, ICommonManagementDbContext
    {
        public DbSet<User> Users { get; set; }
        public DbSet<Balance> Balances { get; set; }
        public DbSet<Recharge> Recharges { get; set; }


        public DbSet<Score> Scores { get; set; }
        public DbSet<Level> Levels { get; set; }
        public DbSet<Notice> Notices { get; set; }


        public DbSet<Feedback> Feedbacks { get; set; }


        public DbSet<Category> Categories { get; set; }
        public DbSet<Comment> Comments { get; set; }
        public DbSet<Press> Presses { get; set; }


        public DbSet<Rotation> Rotations { get; set; }


        public DbSet<Province> Provinces { get; set; }
        public DbSet<City> Citys { get; set; }
        public DbSet<Area> Areas { get; set; }
        public DbSet<Location> Locations { get; set; }


        public DbSet<Service> Services { get; set; }


        public DbSet<Product> Products { get; set; }


        public DbSet<Order> Orders { get; set; }


        public DbSet<Weather> Forecasts { get; set; }
        public DbSet<AirQuantity> AirQuantities { get; set; }
        public DbSet<ComfortLevel> ComfortLevels { get; set; }
        public DbSet<TempInfo> TempInfos { get; set; }
        public DbSet<Wind> Winds { get; set; }
        public DbSet<Division> Divisations { get; set; }

        public CommonManagementDbContext(DbContextOptions<CommonManagementDbContext> options)
            : base(options)
        {
        }

        protected override void OnModelCreating(ModelBuilder builder)
        {
            base.OnModelCreating(builder);
            builder.ConfigureCommonManagement();
        }
    }
}